package com.common.sdk.net.download.callback.interfaces;

import java.util.List;

import com.common.sdk.net.download.request.model.DownloadInfo;

public interface IDownloadCallback {
    /**
     * 加载完成后回调,第一次注册回调  OK
     */
    public void initializationSuccess(List<DownloadInfo> downloadInfo);

    /**
     * 新加入下载后触发回调   OK
     * 
     * @param downloadInfo
     */
    void didAddDownloadItem(DownloadInfo downloadInfo);

    /**
     * 批量加入下载后触发回调
     * 
     * @param downloadInfo
     */
    void didAddDownloadList(List<? extends DownloadInfo> infoList);

    /**
     * 等待开始下载任务    OK
     * 
     * @param downloadInfo
     */
    void waitStartDownloadItem(DownloadInfo downloadInfo);
    /**
     * 等待开始下载任务    OK
     * 
     * @param downloadInfo
     */
    void waitStartDownloadList(List<? extends DownloadInfo> infoList);

    /**
     * 即将开始下载任务   OK
     * 
     * @param downloadInfo
     */
    void willStartDownloadItem(DownloadInfo downloadInfo);

    /**
     * 已开始下载任务  OK
     * 
     * @param downloadInfo
     */
    void didStartDownloadItem(DownloadInfo downloadInfo);

    /**
     * 批量开始下载任务
     * 
     * @param downloadInfo
     */
    void didStartDownloadList(List<? extends DownloadInfo> infoList);

    /**
     * 即将暂停下载任务   OK 
     * 
     * @param downloadInfo
     */
    void willPauseDownloadItem(DownloadInfo downloadInfo);

    /**
     * 已经暂停下载任务  OK 
     * 
     * @param downloadInfo
     */
    void didPauseDownloadItem(DownloadInfo downloadInfo);

    /**
     * 批量暂停下载任务
     * 
     * @param downloadInfo
     */
    void didPauseDownloadList(List<? extends DownloadInfo> infoList);

    /**
     * 即将停止下载任务  OK
     * 
     * @param downloadInfo
     */
    void willStopDownloadItem(DownloadInfo downloadInfo);

    /**
     * 停止下载任务  OK
     * 
     * @param downloadInfo
     */
    void didStopDownloadItem(DownloadInfo downloadInfo);

    /**
     * 批量停止下载任务
     * 
     * @param downloadInfo
     */
    void didStopDownloadList(List<? extends DownloadInfo> infoList);

    /**
     * 即将删除下载任务    OK
     * 
     * @param downloadInfo
     */
    void willDeleteDownloadItem(DownloadInfo downloadInfo);

    /**
     * 已经完成删除任务
     * 
     * @param downloadInfo
     */
    void didDeleteDownloadItem(DownloadInfo downloadInfo);

    /**
     * 已经删除多项的回调
     * 
     * @param infoList
     */
    void didDeleteDownloadList(List<? extends DownloadInfo> infoList);

    /**
     * 完成下载任务  OK
     * 
     * @param downloadInfo
     */
    void onFinishedDownload(DownloadInfo downloadInfo);

    /**
     * 下载中  OK
     * 
     * @param downloadInfo
     */
    void onProgressDownload(DownloadInfo downloadInfo);

    /**
     * 即将下载
     * @param downloadInfo
     */
    void getNextDownloadInfo(DownloadInfo downloadInfo);

    /**
     * 下载失败  OK 
     * 
     * @param downloadInfo
     */
    void onFailedDownload(DownloadInfo downloadInfo, int state);

    /**
     * 无下一项下载
     * @param isAllFinished
     */
    void noNextDownload(boolean isAllFinished);

}
